RAIS  3.2
RAIS::DataAccessLayer::Localisation Class Reference

This class implements D.A.L. methods for localisation. More...

List of all members.

Static Public Member Functions

static string Translate (string context, string textToTranslate, string sourceLanguage, string targetLanguage)
 This method performs translation of a supplied text from source into the specified language.
static bool CultureExists (String cultureName)
 This method verifies whether the specified culture exists in DB.
static bool AddCulture (RAIS.Common.Localization.Culture culture, ref string returnMessage)
 This method adds a new culture to DB.
static bool SaveCulture (RAIS.Common.Localization.Culture culture, ref string returnMessage)
 This method saves a culture in DB.
static bool DeleteCulture (RAIS.Common.Localization.Culture culture, ref string returnMessage)
 This method deletes a culture from DB.
static TranslationItems GetAllTranslations (Culture sourceLanguage, Culture targetLanguage, bool untranslated, string sortExpression, string sortDirection)
 This method retrieves a list of all translation items from DB.
static TranslationItems GetTranslationsByContext (Context context, Culture sourceLanguage, Culture targetLanguage, bool untranslated, string sortExpression, string sortDirection)
 This method retrieves a list of translation items for context from DB.
static bool SaveTranslations (TranslationItems translations, ref string returnMessage)
 This method saves a modified translations in DB.

Properties

static Cultures SupportedLanguages [get]
 This property retrieves a list of supported languages (read-only property).
static Contexts Contexts [get]
 This property retrieves a list of Contexts (read-only property).

Detailed Description

This class implements D.A.L. methods for localisation.


Member Function Documentation

static bool RAIS::DataAccessLayer::Localisation::AddCulture ( RAIS.Common.Localization.Culture  culture,
ref string  returnMessage 
) [static]

This method adds a new culture to DB.

Parameters:
cultureNew culture object.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 139 of file Localisation.cs.

static bool RAIS::DataAccessLayer::Localisation::CultureExists ( String  cultureName) [static]

This method verifies whether the specified culture exists in DB.

Parameters:
cultureCulture.
Returns:
true if the culture exists, otherwise false

Definition at line 127 of file Localisation.cs.

static bool RAIS::DataAccessLayer::Localisation::DeleteCulture ( RAIS.Common.Localization.Culture  culture,
ref string  returnMessage 
) [static]

This method deletes a culture from DB.

Parameters:
cultureCulture object to be delted.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 204 of file Localisation.cs.

static TranslationItems RAIS::DataAccessLayer::Localisation::GetAllTranslations ( Culture  sourceLanguage,
Culture  targetLanguage,
bool  untranslated,
string  sortExpression,
string  sortDirection 
) [static]

This method retrieves a list of all translation items from DB.

Returns:
Dictionary of translation item names vs TranslationItem objects

Definition at line 233 of file Localisation.cs.

static TranslationItems RAIS::DataAccessLayer::Localisation::GetTranslationsByContext ( Context  context,
Culture  sourceLanguage,
Culture  targetLanguage,
bool  untranslated,
string  sortExpression,
string  sortDirection 
) [static]

This method retrieves a list of translation items for context from DB.

Returns:
Dictionary of translation item names vs TranslationItem objects

Definition at line 242 of file Localisation.cs.

static bool RAIS::DataAccessLayer::Localisation::SaveCulture ( RAIS.Common.Localization.Culture  culture,
ref string  returnMessage 
) [static]

This method saves a culture in DB.

Parameters:
cultureCulture object.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 172 of file Localisation.cs.

static bool RAIS::DataAccessLayer::Localisation::SaveTranslations ( TranslationItems  translations,
ref string  returnMessage 
) [static]

This method saves a modified translations in DB.

Parameters:
translations- dictionary of TranslationItem objects.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 253 of file Localisation.cs.

static string RAIS::DataAccessLayer::Localisation::Translate ( string  context,
string  textToTranslate,
string  sourceLanguage,
string  targetLanguage 
) [static]

This method performs translation of a supplied text from source into the specified language.

Parameters:
textToTranslateText in source language to be translated
sourceLanguageSource language
targetLanguageTarget language
Returns:
Translated text
Note:
The methods throws an exception if the the text is not found in the translation table.

Definition at line 86 of file Localisation.cs.


Property Documentation

Contexts RAIS::DataAccessLayer::Localisation::Contexts [static, get]

This property retrieves a list of Contexts (read-only property).

Returns:
Dictionary of context names vs context objects
Warning:
Addressing this property casues an MS SQL query. Use is for initialising a local variable instead of addressing it iteratively.

Definition at line 68 of file Localisation.cs.

Cultures RAIS::DataAccessLayer::Localisation::SupportedLanguages [static, get]

This property retrieves a list of supported languages (read-only property).

Returns:
Dictionary of culture names vs culture objects
Warning:
Addressing this property casues an MS SQL query. Use is for initialising a local variable instead of addressing it iteratively.

Definition at line 54 of file Localisation.cs.


The documentation for this class was generated from the following file: